﻿<%@ Page Title="地标" Language="C#" MasterPageFile="~/search/SearchMastePage.master"
    AutoEventWireup="true" CodeBehind="area.aspx.cs" Inherits="map.search.area" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>

<%@ Register assembly="RuleCode.Common" namespace="RuleCode.Controls" tagprefix="cc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head2" runat="server">

    <style type="text/css">
        .style_t1
        {
            width: 100%;
        }
        .style_t2
        {
            width: 100%;
        }
        .style1
        {
            width: 100%;
        }
        .style2
        {
            width: 200px;
            vertical-align: top;
        }
        .itemcateSelectDiv, .shopcateSelectDiv
        {
            padding: 5px 0px 5px 0px;
            text-align: left;
        }
        .itemcateSelectDiv select, .shopcateSelectDiv select
        {
            width: 120px;
        }
        .itemcateSelectUl
        {
            list-style-type: none;
        }
        .ErrorMsgP
        {
            border: solid 1px red;
            background-color: #FFF2F2;
            width: 150px;
            margin-top: 3px;
        }
        .MasterDiv
        {
            width: 100%;
        }
        .DataListHeaderTable
        {
            width: 100%;
            padding-top: 5px;
            background: url(/img/small_tab_bg.gif) repeat;
        }
        .DataListItemTable
        {
            width: 100%;
            height: 170px;
            margin: 4px 0px 4px 0px;
            border-left: solid 1px #A1C67B;
            border-right: solid 1px #A1C67B;
            padding: 0;
            margin: 0;
            border-collapse: collapse;
        }
        .DataListItemTable td
        {
            text-align: left;
        }
        .DataListItemTable td img
        {
            border: none;
        }
        .DataListHeaderToolDiv, .DataListFooterToolDiv
        {
            width: 100%;
            margin-top: 2px;
            border-top: solid 1px lightGray;
            border-bottom: solid 1px lightGray;
            background-color: #ECECEC;
            padding-top: 3px;
            padding-bottom: 3px;
        }
        .DataListHeaderToolDiv table, .DataListFooterToolDiv table
        {
            padding-left: 30px;
        }
        .DataListFooterToolDiv table td, .DataListHeaderToolDiv table td
        {
            padding-left: 5px;
        }
        .allItemsUl li
        {
            border-bottom: solid 1px lightBlue;
            background: url(../img/tagleft.gif) no-repeat left top;
            height: 23px;
            display: inline;
            list-style-type: none;
            margin-left: 5px;
        }
        .allItemsUl li a
        {
            line-height: 23px;
            background: url(../img/tagright.gif) no-repeat right top;
            padding-left: 10px;
            padding-right: 10px;
        }
        .itemOperateButton
        {
            width: 60px;
        }
    </style>

    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script>

    <script src="../js/dropdowncontent.js" type="text/javascript"></script>

    <script src="../js/JScript1.js" type="text/javascript"></script>

    <script src="../js/dom-drag.js" type="text/javascript"></script>

    <script type="text/javascript">
         function selall() {
             currecid = '';
             var link = "area.aspx";
             window.location.href = link;
         }
function selarea2(a) {
    currecid = a;
    var keyvalue = document.getElementById("ctl00_ctl00_ContentPlaceHolder1_TextBox1").value;
    var link = "area.aspx?keyvalue=" + keyvalue + "&area4recid=" + currecid;
    window.location.href = link;

}
function btnclick() {
    var keyvalue = document.getElementById("ctl00_ctl00_ContentPlaceHolder1_TextBox1").value;
    keyvalue = encodeURI (keyvalue);

    var link = "area.aspx?keyvalue=" + keyvalue + "&area4recid=" + currecid;
    window.location.href = link;

}

function initsdsfd(keyvalue, area4recid) {
    var map = new GMap2(document.getElementById("map_canvas"));
    if (area4recid == '' || area4recid == 'undefined') {
        if (keyvalue != 'undefined') {
            document.getElementById("ctl00_ctl00_ContentPlaceHolder1_TextBox1").value = keyvalue;
        }
        var province = "";
        var result = AjaxFunction.getCurrentState();
        if (result.value != null && result.value != "") {
            province = result.value;
        }
        if (province == "")
            province = "北京";
        geocoder = window.geocoder || (new GClientGeocoder());
        if (geocoder) {
            geocoder.getLatLng(
                    (province == "吉林") ? "吉林省" : province,
                    function(point) {
                        if (!point) {
                            alert("不能解析: " + province);
                        } else {
                            map.setCenter(point, 10);
                        }
                    }
            );
        }
        return;
    }
    currecid = area4recid;

    document.getElementById("ctl00_ctl00_ContentPlaceHolder1_TextBox1").value = keyvalue;
    var area3id = AjaxFunction.Getarea3id(area4recid).value;
    var result = AjaxFunction.Getselarea1(area3id);
    if (result != null && result.value != null) {
        document.getElementById("area4").innerHTML = result.value;
    }
    document.getElementById("a" + area4recid).className = "style_t3";
    var result = AjaxFunction.Getselarea2(currecid);
    if (result != null && result.value != null) {
        var s = result.value.split("|");
        map.setCenter(new GLatLng(s[2], s[1]), 14);
        var point1 = new GLatLng(s[2], s[1]);
        var marker1 = new GMarker(point1);
        GEvent.addListener(marker1, "click", function() {
            marker1.openInfoWindowHtml(s[3]);
        });
        map.addOverlay(marker1);
    }
}

    </script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="bodyContent" runat="server">
<asp:Literal ID="Literal_map" runat="server"></asp:Literal>
    <div id="container">
        <table style="width: 100%; margin-top: 5px;">
            <tr>
                <td>
                    <div id="panel_map_id_5" style="width: 100%; background-color: #DFF0CB; border: solid 1px #8ACD3E;">
                        <asp:Literal ID="Literal1" runat="server"></asp:Literal>
                    </div>
                </td>
            </tr>
        </table>
        <div id="mainList" style="width: 100%">
            <table style="width: 100%; height: 34px; padding: 0; margin: 0; border: 0; border-collapse: collapse;">
                <tr>
                    <td style="vertical-align: top;">
                        <div class="MasterDiv">
                            <asp:DataList ID="MainDataList" runat="server" DataKeyField="RECID" Width="100%"
                                BackColor="White" BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px"
                                CellPadding="4" GridLines="Vertical" ItemStyle-BorderStyle="Solid" ForeColor="Black"  OnItemDataBound="DataList_all_ItemDataBound" >
                                <FooterStyle BackColor="#CCCC99" />
                                <AlternatingItemStyle BackColor="White" />
                                <ItemStyle Width="100%" BackColor="White" ForeColor="#003399" BorderStyle="Solid"
                                    BorderColor="#FFFFFF" />
                                <SelectedItemStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
                                <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
                                <ItemTemplate>
                                    <div style="border-bottom: solid 1px #A1C67B;">
                                        <table id="shoptitle" style="width: 100%; height: 34px; padding: 0; margin: 0; border: 0;
                                            border-collapse: collapse;">
                                            <tr>
                                                <td style="background-image: url(/img/bar2.gif); background-position: right; background-repeat: repeat-x;">
                                                    <a href="/s.aspx?id=<%# Eval("RECID").ToString()%>" target="_blank">
                                                        <%# Eval("BizAreaName").ToString()%></a>
                                                </td>
                                                <td style="width: 80px; background-image: url(/img/bar1.gif); background-position: right;
                                                    background-repeat: no-repeat;">
                                                </td>
                                            </tr>
                                        </table>
                                        <table class="DataListItemTable">
                                            <tr>
                                                <td style="width: 170px;" title="图片">
                                                    <asp:HyperLink ID="mainlink" runat="server" NavigateUrl='<%# "areadetail.aspx?id="+Eval("RECID").ToString() %>' target="_blank">
                                                        <img style="width: 160px; height: 160px; border: solid 1px #D2D2D2;" alt="" src='<%# (Eval("BizAreaImagePath").ToString()=="") ? "/img/upItem.gif":(Eval("BizAreaImagePath").ToString())%>' />                                                    </asp:HyperLink>
                                                </td>
                                                <td style="text-align: left; vertical-align: top; color: Black;">
                                                    <div style="width: 100%;">
                                                        <a href='<%# "areadetail.aspx?id="+Eval("RECID").ToString() %>' target="_blank">
                                                        <%# Eval("BizAreaName").ToString()%></a>
                                                    </div>
                                                   
                                                   <asp:DataList ID="list_in" runat="server"><ItemTemplate> 商家数量:<%# Eval("ShopCount").ToString() %></ItemTemplate></asp:DataList>
                                                    <br />
                                                    简介：<%# Eval("Description").ToString()%>
 
                                                </td>
                                            </tr>
                                        </table>
                                        
                                    </div>
                                </ItemTemplate>
                            </asp:DataList>
                            <div id="NoDataDiv" runat="server" style="vertical-align: middle; margin: 3px 0px 3px 0px;
                                padding-left: 20px;">
                                <span style="color: Red">对不起， 没有找到你查找的数据！</span>
                            </div>
                            <asp:Label ID="TotalCountLabel" ForeColor="Gray" Font-Size="Smaller" runat="server"
                                Text="Label"></asp:Label>
                            <cc1:WebPager ID="WebPager1" runat="server" ControlToPaginate="MainDataList" OnPageIndexChanged="WebPager1_PageIndexChanged"
                                PageSize="10" />
                        </div>
                    </td>
                    <td style="width: 3px;">
                    </td>
                    <td style="width: 240px; vertical-align: top;">
                        <div id="map_canvas" style="width: 100%; height: 240px; border: solid 1px #8ACD3E;
                            margin-top: 3px; margin-right: 2px; z-index: -1;">
                        </div>
                    </td>
                </tr>
            </table>
            <%--</ContentTemplate>
</asp:UpdatePanel>--%>
        </div>
    </div>

    <script type="text/javascript">
    function subInit() {
        $("#netshoping").removeClass("actived");
        $("#bizarealist").addClass("actived");
    }
    </script>

</asp:Content>
